package com.zhj.rabbitmq.demo.delayqueue;

import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author zhengjibin
 * @version 1.0.0
 * @ClassName DelayedConsumer.java
 * @Description 延迟交换机消息消费
 * @createTime 2023年03月25日 09:28:00
 */
@Component
public class DelayedConsumer {

    @RabbitListener(queues={DelayedExchangeConfig.DELAYED_QUEUE})
    public void consumer1(Message message){
        String str = new String(message.getBody());
        System.out.println(str);
    }
}
